#include <LED.H>



void led_disp(unsigned char adder,enable)
{
	unsigned char temp = 0x00;
	unsigned char temp_oid = 0xff;
	if(enable)
	temp |= 0x01<<adder;
	else
 	temp &= ~(0x10 <<adder);
	
	if(temp !=temp_oid)
	{
	
	P0 = ~temp;
	P2 = P2&0X1F |0X80;
	P2 &= 0X1F;
	temp_oid = temp;
	}






}


void relay(unsigned char num)
{
static	unsigned char temp1 = 0x00;
static unsigned char temp_oid1 = 0xff;
	if(num)
	temp1 |= 0x10;
	else
 	temp1 &= ~0x10;
	
	if(temp1 !=temp_oid1)
	{
	
	P0 = temp1;
	P2 = P2&0X1F |0Xa0;
	P2 &= 0X1F;
	temp_oid1 = temp1;
	}


}